# 输出二维数组
def show2d(b):
    for i in range(len(b)):
        for j in range(i + 1):
            print(b[i][j], end=" ")
        print()


# 创建一个二维数组 行数row,列数为col
def create2d(row, col):
    b = []
    for i in range(row):
        b.append(list([0] * col))
    return b


def main():
    n = int(input())
    b = create2d(n, n)
    for i in range(n):
        b[i][0] = 1
        b[i][i] = 1
    for i in range(2, n):
        for j in range(1, i):
            b[i][j] = b[i - 1][j - 1] + b[i - 1][j]

    show2d(b)


main()
